package com.atguigu.tools;

import dev.langchain4j.agent.tool.Tool;
import org.springframework.stereotype.Component;

@Component
public class CalculatorTools {

    @Tool
    double sum(double a, double b) {
        System.out.println("a = " + a + ", b = " + b);
        return a + b;
    }
    @Tool
    double square(double a) {
        System.out.println("平方根运算");
        return Math.sqrt(a);
    }
}
